/******************************************************************/
/*                                                                */
/*  Winpooch : Windows Watchdog                                   */
/*  Copyright (C) 2004-2005  Benoit Blanchon                      */
/*                                                                */
/*  This program is free software; you can redistribute it        */
/*  and/or modify it under the terms of the GNU General Public    */
/*  License as published by the Free Software Foundation; either  */
/*  version 2 of the License, or (at your option) any later       */
/*  version.                                                      */
/*                                                                */
/*  This program is distributed in the hope that it will be       */
/*  useful, but WITHOUT ANY WARRANTY; without even the implied    */
/*  warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR       */
/*  PURPOSE.  See the GNU General Public License for more         */
/*  details.                                                      */
/*                                                                */
/*  You should have received a copy of the GNU General Public     */
/*  License along with this program; if not, write to the Free    */
/*  Software Foundation, Inc.,                                    */
/*  675 Mass Ave, Cambridge, MA 02139, USA.                       */
/*                                                                */
/******************************************************************/

#ifndef _HOOK_FILE_H
#define _HOOK_FILE_H

#include <windows.h>
#include <ntdef.h>

// taken from ddk/winddk.h :
typedef struct _IO_STATUS_BLOCK {
  union {
    NTSTATUS  Status;
    PVOID  Pointer;
  } ;
  ULONG_PTR  Information;
} IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;


BOOL HookFile_Init () ;


NTSTATUS WINAPI Hook_NtCreateFile (PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES,
				   PIO_STATUS_BLOCK, PLARGE_INTEGER,
				   ULONG, ULONG, ULONG, ULONG, PVOID, ULONG) ;

NTSTATUS WINAPI Real_NtCreateFile (PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES,
				   PIO_STATUS_BLOCK, PLARGE_INTEGER,
				   ULONG, ULONG, ULONG, ULONG, PVOID, ULONG) ;

NTSTATUS WINAPI Hook_NtDeleteFile (POBJECT_ATTRIBUTES) ;

NTSTATUS WINAPI Real_NtDeleteFile (POBJECT_ATTRIBUTES) ;

NTSTATUS WINAPI Hook_NtOpenFile (PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES,
				 PIO_STATUS_BLOCK, PLARGE_INTEGER,
				 ULONG, ULONG) ;

NTSTATUS WINAPI Hook_NtOpenFile (PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES,
				 PIO_STATUS_BLOCK, PLARGE_INTEGER,
				 ULONG, ULONG) ;

NTSTATUS WINAPI Hook_NtSetInformationFile (HANDLE, PIO_STATUS_BLOCK,
					   PVOID, ULONG, ULONG) ;
#endif
